package com.castudio.Util;

import java.io.Serializable;

/**
 * 返回json数组
 */
public class JsonArray implements Serializable {
    private int code;
    private String msg;
    private String data = null;

    public JsonArray(int code, String msg, String data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    /**
     * 重点注意返回格式
     * */
    @Override
    public String toString() {
        return "{\"code\":" + code
                + ",\"msg\":\"" + msg
                + "\",\"data\":" + data
                + "}";
    }
}
